<?php
/**
 * url
 * @param int $status
 * @return type 
 */
function url($path,$param = array()) {
	$url_model = C('URL_MODEL');
	list($key,$value) = each($param);
	switch($url_model){
		case 1 :
			$url = U($path,array($key=>$value));
			unset($param[$key]);
			$path_info = http_build_query($param);
			!empty($path_info) && $url .= '?' . $path_info;
			break;
		case 2 :
			$parse = explode('/',strtolower(trim($path)));
			$url = '/' . $parse[0]; 
			!empty($value) && $url .= '/' . $value;
			$url .= C('TMPL_TEMPLATE_SUFFIX');
			unset($param[$key]);
			$path_info = http_build_query($param);
			!empty($path_info) && $url .= '?' . $path_info;
			break;
		case 3 : 
			$url = U($path,$param);
			break;
	}
    return $url;
}

?>